package com.party.core.dao.read.mall;

import com.party.common.paging.Page;
import com.party.core.dao.read.BaseReadDao;
import com.party.core.model.mall.MallEvaluate;
import com.party.core.model.mall.MallEvaluateListOutput;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @Author: Administrator.
 * @Description: 评价
 * @Date:Created in 2017/9/19 0019 下午 15:44.
 */
@Repository
public interface MallEvaluateReadDao extends BaseReadDao<MallEvaluate> {
    /**
     * 评价列表
     *
     * @param params
     * @param page
     * @return
     */
    List<MallEvaluateListOutput> newListPage(@Param(value = "params") Map<String, Object> params, Page page);

    /**
     * 计数
     *
     * @param params
     * @return
     */
    Integer getCount(@Param(value = "goodsId") String goodsId, @Param(value = "params") Map<String, Object> params);

    MallEvaluateListOutput getFirst(@Param(value = "goodsId") String goodsId);

    List<MallEvaluateListOutput> webListPage(@Param(value = "evaluate") MallEvaluate evaluate, @Param(value = "params") Map<String, Object> params, Page page);
}
